package com.mrjy.share.bo;

import java.util.List;
import java.util.Map;

import com.mrjy.common.entity.ShareCodeInfo;
import com.mrjy.common.entity.UserInfo;

public interface IShareCodeBo {

	public int txInsert(UserInfo u);
		
	public int txBindUserInfo(ShareCodeInfo sc);
	
	public List<ShareCodeInfo> queryShareCodeInfo(UserInfo u);
	
	public  List<ShareCodeInfo> listMemberCountByShareCode(ShareCodeInfo shareCode);
	/**
	 *  检查是否被一级分销员邀请
	 * @param mobilePhone
	 * @param map
	 */
	public void isInvited(String mobilePhone, Map<String, Object> map);
	/**
	 * 更新被邀请状态
	 * @param info
	 * @param map
	 */
	public void txInvitedStatus(ShareCodeInfo info, Map<String, Object> map);
	/**
	 * 统计一级分销下所有二级分销成员及其推荐总人数
	 * @param info
	 * @return
	 */
	public Object queryCountSecondary(ShareCodeInfo info);
	/**
	 * 统计一级分销下所有二级分销成员分销总数
	 * @param info
	 * @return
	 */
	public Object countAllByUserId(ShareCodeInfo info);

	public Object queryShareCodeDetail(ShareCodeInfo info);
	/**
	 *  查询二级分销员的详细信息，二级分销员主页信息
	 * @param info
	 * @param map 
	 * @return
	 */
	public void querySecondDetailInfo(ShareCodeInfo info, Map<String, Object> map);
	
	/**
	 * 发送邀请
	 * @param info
	 */
	public Object txSendInvited(ShareCodeInfo info);
	/**
	 * 查询一级分销员还没有分享的子分享码条数
	 * @param info 
	 * @return
	 */
	public int queryUnShareCodeCount(ShareCodeInfo info);
	
	public Object queryUnshareCode(ShareCodeInfo info);
	
}
